Conventionally, there has been provided a heating cooker for heating foods by using a heating plate on which a high-frequency heat generator is attached, the heating cooker including a light-receiving element provided outside the heating compartment so as to face inside of the heating compartment, wherein based on an output of the light-receiving element as to its detected brightness inside the heating compartment, it is decided whether or not the heating plate has been set in the heating compartment (see, e.g., JP 2012-42146 A (PTL 1)). Upon a decision as to whether or not the heating plate has been set in the heating compartment, if it is decided that the heating plate has not been set in the heating compartment, this heating cooker is enabled to decrease or stop the heating power.